﻿using System;
using CoreGraphics;
using mb;
using mb.iOS;
using PagerManager;
using UIKit;

namespace libmp
{
    public class VCMovieList : UICollectionViewController
    {
        static ILog logger = mb.ServiceLocator.Instance.Get<ILog>();

        public VCMovieList() : base(new UICollectionViewFlowLayout()
        {
            // ItemSize = new CGSize(200, 200),
            MinimumLineSpacing = 220,
                MinimumInteritemSpacing = 10,
        }) { }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // CollectionView.SetCollectionViewLayout(new UICollectionViewFlowLayout(), false);

            CollectionView.RegisterClassForCell(typeof(MyCollectionViewCell), "Cell");
            CollectionView.BackgroundColor = UIColor.Clear;

            CollectionView.DataSource = new MovieCollectionSource(CollectionView);
            CollectionView.Delegate = new MovieCollectionDelegate();
        }

        public void Refresh()
        {
            // Load vc data here
        }

    }
}